package com.sinodata.bsm.center.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.sinodata.bsm.center.bean.Condition;
import com.sinodata.bsm.center.bean.EventBean;
import com.sinodata.bsm.center.bean.Page;
import com.sinodata.bsm.center.bean.ReduceEventDynamicBean;
import com.sinodata.bsm.common.vo.Event;
import com.sinodata.bsm.common.vo.EventRemark;

/**
 * <p>
 * Description: 事件DAO接口
 * </p>
 *
 * @author liulibo
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2012-5-25 AM 10:06:33    liulibo        1.0         To create
 * </p>
 *
 * @since 
 * @see     
 */
public interface EventDao {

    /**
     * 分页查询
     * 
     * @param page
     * @param condition
     * @return
     */
    public Page<EventBean> findEventByPage(Page<EventBean> page, Condition condition, String resTypeId, List<String> dimensionArray);

    /**
     * 根据条件查询 
     * 
     * @param condition
     * @return
     */
    public List<EventBean> findEventByCondition(Condition condition, String resTypeId, List<String> dimensionArray);

    /**
     * 获取全部新事件EventVo
     * 
     * @return
     */
    public List<Event> getAllNewEvent();

    List<Event> getNewEvents(Date occurTime, Integer level);

    /**
     * 根据事件ID查询相应评论
     * @param eventId
     * @return
     */
    public List<EventRemark> findEventRemarkByEventId(Long eventId);

    /**
     * 根据id校验事件是否被认领
     * @param ids
     * @return
     */
    public Integer checkEventAck(Long[] ids);

    /**
     * 查询恢复事件，清除的事件
     * 
     * @param eventId
     * @return
     */
    public Event findEventByConfirmEventId(Long eventId);

    public Integer checkEventConfirm(Long[] ids);

    /**
     * 资源活动事件 高级查询
     * @param page
     * @param condition
     * @return
     */
    public Page<Object> resActiveEventPage(Page<Object> page, Condition condition, Map<String, Object> parameter);

    public List<ReduceEventDynamicBean> getDynamicEvent(String time, String reduceType);

    public List<Object[]> getActiveEventNum(String resIds);
}
